# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=atk
pkgver=2.30.0
pkgrel=1
pkgdesc="Interface definitions of accessibility infrastructure"
url="https://gitlab.gnome.org/GNOME/atk"
arch=(x86_64)
license=(LGPL)
depends=(glib2)
makedepends=(gobject-introspection git gtk-doc meson)
_commit=90ed6bd964b8a2b93c7cf3ea018483e437913785  # tags/ATK_2_30_0^0
source=("git+https://gitlab.gnome.org/GNOME/atk.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^ATK_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D docs=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
